//去除谷歌浏览器的scroll、wheel等事件警告

type SetEventTarget = EventTarget & {
  func: (
    // eslint-disable-next-line no-unused-vars
    type: string,
    // eslint-disable-next-line no-unused-vars
    callback: EventListenerOrEventListenerObject | null,
    // eslint-disable-next-line no-unused-vars
    options?: AddEventListenerOptions | boolean
  ) => void
}
const ployFill = () => {
  if (typeof EventTarget !== 'undefined') {
    let func = EventTarget.prototype.addEventListener
    EventTarget.prototype.addEventListener = function (type, fn, capture) {
      ;(this as SetEventTarget).func = func
      if (typeof capture !== 'boolean') {
        capture = capture || {}
        capture.passive = false
      }
      ;(this as SetEventTarget).func(type, fn, capture)
    }
  }
}
export default ployFill
